package com.zzyl.nursing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzyl.nursing.domain.Reservation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface ReservationMapper extends BaseMapper<Reservation> {
    /**
     * 分页查询预约信息
     *
     * @param Reservation
     * @return
     */
    List<Reservation> selectReservationPage(Reservation Reservation);
    /**
     * 新增预约信息
     *
     * @param reservation 预约信息
     * @return 结果
     */
    public int insertReservation(Reservation reservation);
    /**
     * 取消预约
     *
     * @param id
     * @return 结果
     */
    @Update("update reservation set status = 2 where id = #{id}")
    void updateReservationStatus(Long id);
}
